package inits

import (
	"fmt"
	"order/global/pkg"
)

func Init() {
	pkg.MysqlConn()
	pkg.RedisConn()
	pkg.RabbitMqConn = pkg.NewRabbitMQSimple("order_sum")
	go RabSum()
}
func RabSum() {
	simple := pkg.RabbitMqConn.ConsumeSimple()
	fmt.Println("rabbitmq consume opened")
	for delivery := range simple {
		fmt.Println(delivery.Body)
	}
}
